package com.teach.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.teach.service.RoleService;

@RestController
@RequestMapping("/role")
public class RoleController {
	
	@Autowired
	private RoleService service;

	@GetMapping("list.do")
	public Object doList() {
		return service.listAll();
	}
	
	@GetMapping("get.do")
	public Object doGet(Integer roleId) {
		return service.get(roleId);
	}
	
	
}
